#include "linesviewer.h"

LinesViewer::LinesViewer( QObject *parent )
    :QObject( parent )
{
    viewer.setViewportUpdateMode( QGraphicsView::SmartViewportUpdate );
    viewer.setFixedSize( WIDTH, HEIGHT );
    viewer.setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    viewer.setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    viewer.setScene( &scene );
    viewer.show();
    QTimer * timer = new QTimer( this );
    connect( timer, SIGNAL(timeout()), this, SLOT(updateView()) );
    timer->start( 25 );
    addNewLine();
}
